package com.tensquare.recurit.service;


import com.tensquare.recurit.dao.RecruitDao;
import com.tensquare.recurit.pojo.Recruit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecruitService {

    @Autowired
    private RecruitDao recruitDao;

    //1.查询推荐职位列表
    public List<Recruit> findByRecommend() {
         return recruitDao.findTop4ByStateOrderByCreatetimeDesc("2");
    }
    //2.查询最新职位的列表
    public List<Recruit> findByCreateTime(){
        return recruitDao.findTop12ByStateNotOrderByCreatetimeDesc("0");
    }
}
